#include<stdio.h>

int a[25][25];

int main()
{
	int n;	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
	{
		for (int j = 1; j <= n; j++)
		{
			int t = 0;
			if (i < j)    t = -1;
			else if (i > j)    t = 1;
			printf("%8d", t);
		}
		printf("\n");
	}
	return 0;
}